<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>服务通知详细信息</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../../css/mui.min.css">
		<link rel="stylesheet" href="../../../css/global.css">
		<link rel="stylesheet" href="../../../css/style.css">

	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title" class="mui-title">服务通知详细信息</h1>
		</header>
		<div class="mui-content">
			<div class="details_con">
				<div class="clum">
					<span class="name">服务类型</span>
					<span  class="txt"  id="serviceType"></span>
				</div>
				<div class="clum">
					<span class="name">保修性质</span>
					<span class="txt" id="isWarranty"></span>
				</div>
				<div class="clum_arr">
					<span class="name_arr">故障描述</span>
					<span class="txt_arr" id="troubleDescription"></span>
				</div>
				<div class="clum_arr">
					<span class="name_arr">指定工程师</span>
					<span class="txt_arr" id="accoutfseId"></span>
				</div>
				<div class="clum_arr">
					<span class="name_arr">期望服务时间</span>
					<span class="txt_arr"  style=" width: auto" id="hopeBusinessHours"></span>
				</div>
				<div class="clum_arr">
					<span class="name_arr">完备时间</span>
					<span class="txt_arr" id="maturityDate"></span>
				</div>
				<div class="clum_arr">
					<div class="name_arr" style="width: 100%;">备注</div>
					<div class="txt_arr" id="remark" style="text-align: left;width: 100%;padding: 0;"></div>
				</div>
				<div class="clum_arr">
					<span class="name_arr">验收需求</span>
					<span class="txt_arr" id="acceptrequest"></span>
				</div>
			</div>
		
			<div style="height: 50px;"></div>
		</div>

		<!-- js代码 start -->

		<!-- 基础js start -->
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/utils/h.js"></script>
		<script src="../../../js/constant.js"></script>
		<script src="../../../js/common.js"></script>
		<script src="../../../js/utils/base64.js"></script>
		<script src="../../../js/utils/md5.js"></script>
		<script src="../../../js/utils/sortMap.js"></script>
		<script src="../../../js/utils/http.js"></script>
		<script src="../../../js/app.js"></script>
		<!-- 基础js end -->

		<script type="text/javascript" charset="utf-8">
			(function($, doc) {
				$.init();

				var ServiceNoticeId
				var serviceNo
				
				// 服务通知详细信息用
				var serviceType
				var isWarranty
				var troubleDescription
				var remark

				$.plusReady(function() {
					// 从上一个页面取值
					var self = plus.webview.currentWebview();
					 // 获取上一个页面传过来的参数并显示到页面
					 ServiceNoticeId = self.ServiceNoticeId;
					 serviceNo = self.serviceNo;
					 serviceType = self.serviceType;
					 isWarranty = self.isWarranty;
					 troubleDescription = self.troubleDescription;
					 remark = self.remark;
					 
					 console.log("ServiceNoticeId:"+ServiceNoticeId+"	serviceNo:"+serviceNo)
					 
					 // 获取详情的方法
					 getDetails();
					 
					 
				});
				
				// 获取详情的方法
				function getDetails(){
					ajaxGet(BASE_URL + "cc/instrument/getServiceInstrument", {
						"ServiceNoticeId": ServiceNoticeId
					}, function(data) {
						console.log(JSON.stringify(data))
						if (data.code == 200) {
							if(data.data!=""){
							
								h("#serviceType").html(serviceType);
								h("#isWarranty").html(isWarranty);
								h("#troubleDescription").html(troubleDescription);
								h("#remark").html(remark);
						
								if(data.data[0].acceptrequest==undefined || data.data[0].acceptrequest==""){
									h("#acceptrequest").html("无");
								}else{
									h("#acceptrequest").html(data.data[0].acceptrequest);
								}
								
							}

						}
					}, function(errorMsg) {
						console.log(JSON.stringify(errorMsg))
					});

					ajaxGet(BASE_URL + "cc/notice/getDaiZhiPaiNoticeDetail", {
						"ServiceNoticeId": ServiceNoticeId
					}, function(data) {
						console.log(JSON.stringify(data))
						if (data.code == 200) {
							if(data.data!=""){

                                 console.log(JSON.stringify(data.data))
								if(data.data.designEngineer==undefined || data.data.designEngineer==""){
									h("#accoutfseId").html("无");
								}else{
									h("#accoutfseId").html(data.data.designEngineer);
								}
								if(data.data.maturityDate==undefined || data.data.maturityDate==""){
									h("#maturityDate").html("无");
								}else{
									h("#maturityDate").html(data.data.maturityDate);
								}
								if(data.data.hopeBusinessHours==undefined || data.data.hopeBusinessHours==""){
									h("#hopeBusinessHours").html("无");
								}else{
									h("#hopeBusinessHours").html(data.data.hopeBusinessHours);
								}
							}

						}
					}, function(errorMsg) {
						console.log(JSON.stringify(errorMsg))
					});
				}
				
			}(mui, document));
		</script>
		<!-- js代码 end -->

	</body>

</html>
